BackStageControlActId = 
{
    DoubleExpActivity = 1,      --双倍经验活动
    SecretTreasure = 2,         --龙城秘宝
    NightFighting = 3,          --天武会战
    TreasureMapActivity = 4,    --黑市宝图
    WorshipMonarch = 5,         --膜拜城主
    BossBattleField = 6,        --boss战场
    TwelvePalaces = 7,          --十二星宫
    TianHuang = 8,              --天荒秘境
    DreamLandBoss = 9,          --幻境boss
    MoZun = 10,                 --盟重杀神
    WanShouMoPu = 11,           --万兽魔谱 
    TempleWoMa = 12,            --神殿沃玛
    RedPackets = 13,            --全名红包
    SupplyContent = 14,         --补给争夺
    BaoZangActivity = 15,       --元宝嘉年华
    SceneAnswer = 16,           --场景答题
    Escort = 17,                --运镖
    ServerPK = 18,              --全服争霸
    DarkBox = 19,               --暗之宝箱
    WorldBoss = 20,             --世界BOSS
}

-- 活动状态
BackStageControlActState = 
{
    Close = 0,          --0是关闭
    Open = 1,           --1是开启
    Prepare = 2,        --2是准备
}

function BackStageControlCmd(actId, actState)
    if actState == BackStageControlActState.Close then
        if actId == BackStageControlActId.DoubleExpActivity then
            EndDoubleExpActivity()
        elseif actId == BackStageControlActId.SecretTreasure then
            SecretTreasureEnd()
        elseif actId == BackStageControlActId.NightFighting then
            NightFightingEnd()
        elseif actId == BackStageControlActId.TreasureMapActivity then
            TreasureMapActivityClose()
        elseif actId == BackStageControlActId.WorshipMonarch then
            WorshipMonarchStop()
        elseif actId == BackStageControlActId.DreamLandBoss then
            DreamLandBossEnd()
        elseif actId == BackStageControlActId.MoZun then
            MoZunEnd()
        elseif actId == BackStageControlActId.WanShouMoPu then
			WanShouMoPuActivityClose()
        elseif actId == BackStageControlActId.TempleWoMa then
            OnTempleWoMaStop()
        elseif actId == BackStageControlActId.RedPackets then
            NationwideRedPacketsEnd()
        elseif actId == BackStageControlActId.SupplyContent then
            SupplyContentionEnd()
        elseif actId == BackStageControlActId.BaoZangActivity then
            BaoZangActivityEnd()
        elseif actId == BackStageControlActId.Escort then
            EscortActivityEnd()
        elseif actId == BackStageControlActId.ServerPK then
            ServerPKEnd()
        elseif actId == BackStageControlActId.DarkBox then
            DarkBoxEnd()
        elseif actId == BackStageControlActId.WorldBoss then
            WorldBossStop()
        end
    elseif actState == BackStageControlActState.Open then
        if actId == BackStageControlActId.DoubleExpActivity then
            StartDoubleExpActivity()
        elseif actId == BackStageControlActId.SecretTreasure then
            SecretTreasureStar()
        elseif actId == BackStageControlActId.NightFighting then
            NightFightingStar()
        elseif actId == BackStageControlActId.TreasureMapActivity then
            TreasureMapActivityOpen()
        elseif actId == BackStageControlActId.WorshipMonarch then
            WorshipMonarchStart()
        elseif actId == BackStageControlActId.BossBattleField then
            StartBossBattleField()
        elseif actId == BackStageControlActId.TwelvePalaces then
            StartTwelvePalaces()
        elseif actId == BackStageControlActId.TianHuang then
            StartTianHuang()
        elseif actId == BackStageControlActId.DreamLandBoss then
            DreamLandBossStart()
            DreamLandBossOpenNpcExchange()
        elseif actId == BackStageControlActId.MoZun then
            MoZunBegin()
        elseif actId == BackStageControlActId.WanShouMoPu then
			WanShouMoPuActivityOpen()
        elseif actId == BackStageControlActId.TempleWoMa then
            OnTempleWoMaBegin()
        elseif actId == BackStageControlActId.RedPackets then
            NationwideRedPacketsStar()
        elseif actId == BackStageControlActId.SupplyContent then
            SupplyContentionStar()
        elseif actId == BackStageControlActId.BaoZangActivity then
            BaoZangActivityBegin()
        elseif actId == BackStageControlActId.SceneAnswer then
            SceneAnswerStart()
        elseif actId == BackStageControlActId.Escort then
            EscortActivityStart()
        elseif actId == BackStageControlActId.ServerPK then
            ServerPKStart()
        elseif actId == BackStageControlActId.DarkBox then
            DarkBoxStart()
        elseif actId == BackStageControlActId.WorldBoss then
            WorldBossBegin()
        end
    elseif actState == BackStageControlActState.Prepare then
        if actId == BackStageControlActId.ServerPK then
            ServerPKPrepare()
        end
    end
end

